Ant.property(environment:"env")
grailsHome = Ant.antProject.properties."env.GRAILS_HOME"
baseDir = Ant.project.properties.basedir
Ant.property ( file : 'application.properties' )

includeTargets << new File ( "${grailsHome}/scripts/War.groovy" )

args = "scott.war"

target(default: "a simple gant script") {


	Ant.property ( file : 'application.properties' )
	Ant.property ( file : 'environment.properties' )

	def appName = Ant.project.properties.'app.name'
	def appVersion = Ant.project.properties.'app.version'

	def host = Ant.project.properties.'deployhost'
	def port = Ant.project.properties.'deployport'
	def username = Ant.project.properties.'deployusername'
	def password = Ant.project.properties.'deploypassword'


	echo ( message : "starting deployment" )
	war()

	scp(file:args, todir:"${username}@${host}", password:password,port:port)

}
